tar xf ${DOWNLOADDIR}/gobject-introspection-1.84.0.tar.xz -C ${BUILDDIR}
pushd ${BUILDDIR}/gobject-introspection-1.84.0
    mkdir native-build
    pushd native-build

       #PKG_CONFIG=${SYSDIR}/cross-tools/bin/pkgconf \
       #PKG_CONFIG_PATH=${SYSDIR}/cross-tools/lib64/pkgconfig \
       meson --prefix=${SYSDIR}/cross-tools --libdir=${SYSDIR}/cross-tools/lib64 \
              --buildtype=release ..
        ninja
        ninja install
    popd
popd

cat > ${SYSDIR}/cross-tools/bin/${CROSS_TARGET}-g-ir-scanner << EOF
#!/bin/bash -e
LD_LIBRARY_PATH=${SYSDIR}/cross-tools/lib64/ \
${SYSDIR}/cross-tools/bin/g-ir-scanner \
      --add-include-path=${SYSDIR}/sysroot/usr/share/gir-1.0 \
      --use-binary-wrapper=${SYSDIR}/cross-tools/bin/qemu-loongarch64 \
      --use-ldd-wrapper=${SYSDIR}/cross-tools/bin/qemu-loongarch64-ldd "\$@"
EOF
chmod +x ${SYSDIR}/cross-tools/bin/${CROSS_TARGET}-g-ir-scanner

cat > ${SYSDIR}/cross-tools/bin/${CROSS_TARGET}-g-ir-compiler << EOF
#!/bin/bash -e
LD_LIBRARY_PATH=${SYSDIR}/cross-tools/lib64/ \
${SYSDIR}/cross-tools/bin/g-ir-compiler \
          --includedir=/${SYSDIR}/sysroot/usr/share/gir-1.0 "\$@"
EOF
chmod +x ${SYSDIR}/cross-tools/bin/${CROSS_TARGET}-g-ir-compiler

